/**
 * 
 */
package us.gaaoc.framework.webapp.backingbeans.agent;



import java.util.Map;

import org.apache.log4j.Logger;
import org.springframework.beans.factory.annotation.Configurable;
import org.springframework.transaction.annotation.Transactional;

import us.gaaoc.framework.model.Person;
import us.gaaoc.framework.util.ReportChartUtil;
import us.gaaoc.framework.webapp.backingbeans.BaseBackingBean;
import us.gaaoc.framework.webapp.backingbeans.agent.reports.CaseStatistics;

/**
 * @author Rex McElrath
 * Oct 24, 2007
 *
 */
public class ReportsPage extends BaseBackingBean {	
	/**
	 * 
	 */
	private static final long serialVersionUID = 7477784231906946238L;
	private  String sytemChartString;
	private  String personChartString;
	private String caseStatusChartString;
	private String caseStatusByDayString;
	private String caseStatusByDayMonth;
	private String documentChartString;
    private String signatureChartString;
	private String filingChartString;
	private boolean displayClearButton;
	

	private static final Logger LOG = Logger.getLogger(ReportsPage.class);
	

	
	public ReportsPage(){
		
		ReportChartUtil reportChartUtil = new ReportChartUtil();
		this.sytemChartString=reportChartUtil.systemStatistics();
		this.personChartString=reportChartUtil.personStatistics();
		this.caseStatusChartString=reportChartUtil.caseStatistics();
		this.caseStatusByDayString=reportChartUtil.caseStatisticsByDay();
		this.caseStatusByDayMonth=reportChartUtil.caseStatisticsByMonth();
		//this.documentChartString=reportChartUtil.documentStatistics();
		this.documentChartString=reportChartUtil.documentStatisticsByMonth();
		this.signatureChartString=reportChartUtil.signatureStatistics();
		this.filingChartString=reportChartUtil.filingStatistics();
	}
	
	
	public String goToSystemStatistics() {
		return "goToSystemStatistics";
	}
	public String goToCourtCalendars() {
		return "goToCourtCalendars";
	}
	
	//added by Bhawana
	//navigation maethods
	public String goToPersonStatistics() {
		return "goToPersonStatistics";
		
	}
	public String goToCaseStatistics(){
		return "goToCaseStatistics";
	}
	
	
	public String goToDocumentStatistics(){
		return "goToDocumentStatistics";
	}
	
	public String goToSignatureStatistics(){
		return "goToSignatureStatistics";
	}
	
	public String goToFilingStatistics(){
		return "goToFilingStatistics";
	}
	
	public  String getSignatureStatisticsChart(){
		return "getSignaureStatistics";
	}
	
	public  String getFilingStatisticsChart(){
		return "getFilingStatistics";
	}

    public String getCaseStatusChartString() {
		return caseStatusChartString;
	//	CaseStatistics cs=new CaseStatistics();
	
	}
    public void setCaseStatusChartString(String caseStatusChartString) {
		this.caseStatusChartString = caseStatusChartString;
	}


	public String getPersonChartString() {
		return personChartString;
	}

    public void setPersonChartString(String personChartString) {
		this.personChartString = personChartString;
	} 
    
	public String getDocumentChartString() {
		return documentChartString;
	}

    public void setDocumentChartString(String documentChartString) {
		this.documentChartString = documentChartString;
	}
    
	
    public String getSignatureChartString() {
		return signatureChartString;
	}


	public void setSignatureChartString(String signatureChartString) {
		this.signatureChartString = signatureChartString;
	}


	public String getFilingChartString() {
		return filingChartString;
	}


	public void setFilingChartString(String filingChartString) {
		this.filingChartString = filingChartString;
	}
	
	
   public String getSytemChartString() {
		return sytemChartString;
	}


	public void setSytemChartString(String sytemChartString) {
		this.sytemChartString = sytemChartString;
	}


	public String getCaseStatusByDayString() {
		return caseStatusByDayString;
	}


	public void setCaseStatusByDayString(String caseStatusByDayString) {
		this.caseStatusByDayString = caseStatusByDayString;
	}


	public String getCaseStatusByDayMonth() {
		return caseStatusByDayMonth;
	}


	public void setCaseStatusByDayMonth(String caseStatusByDayMonth) {
		this.caseStatusByDayMonth = caseStatusByDayMonth;
	}
	
	public String goToDismissedCaseReportPage() {
		return "goToDismissedCaseReportPage";
		
	}
	public String back() {
		Map sessionMap = this.getFacesContext().getExternalContext().getSessionMap();		
		String toString = "";
		String fromPage = (String) sessionMap.get("from");
		if (fromPage.equalsIgnoreCase("agentFilingsTablesPage")) {
			toString = "backByAgent";
		}
		else if (fromPage.equalsIgnoreCase("attFilingsTablesPage")) {
			toString = "backByAttorney";
		}
		else if (fromPage.equalsIgnoreCase("clerkMainPage")){
			toString = "backByClerk";
		}
		else if (fromPage.equalsIgnoreCase("judgeMainPage")) {
			toString = "backByJudge";
		}else if (fromPage.equalsIgnoreCase("adminChildEnforcementCaseTypePage")) {
			toString = "adminChildEnforcementCaseType";
		}
		return toString;
	}

	
	public boolean isDisplayClearButton() {
		return displayClearButton;
	}

	public void setDisplayClearButton(boolean displayClearButton) {
		this.displayClearButton = displayClearButton;
	}


}

